403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/03070600.html
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Mod Operator</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">

<a name="mod"></a>
<a name="bm_id3150669"></a>
  <meta itemprop="keywords" content="MOD  operator (mathematical)">


<h1 id="hd_id3150669" dir="auto">
<a name="MOD_h1"></a>Mod Operator</h1>
<p id="par_id3148686" class="paragraph" dir="auto">The <span class="literal">MOD</span> operator takes in two numeric expressions and returns the remainder of the division.</p>

<p id="par_id3148004" class="paragraph" dir="auto">For example, the result of <span class="literal">21 MOD 6</span> is <span class="literal">3</span> because after dividing 21 by 6, the remainder of the division is 3.</p>
<p id="par_id111617300964049" class="paragraph" dir="auto">If the <span class="literal">MOD</span> operation involves non-integer values, both operands are rounded to the nearest integer values. Hence, the value returned by a <span class="literal">MOD</span> operation will always be an integer number.</p>
<p id="par_id561617302820104" class="paragraph" dir="auto">For example, the expression <span class="literal">16.4 MOD 5.9</span> is evaluated as follows:</p>
<ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
    <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
        <p id="par_id151617302878527" class="listitem" dir="auto">The value 16.4 is rounded to 16.</p>
    </li>
    <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
        <p id="par_id351617303087259" class="listitem" dir="auto">The value 5.9 is rounded to 6.</p>
    </li>
    <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
        <p id="par_id91617303114774" class="listitem" dir="auto">The operation <span class="literal">16 MOD 6</span> returns 4, which is the remainder after dividing 16 by 6.</p>
    </li>
</ol>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id921617302349290" dir="auto">Be aware that BASIC's <span class="literal">MOD</span> operator and Calc's <a target="_top" href="en-US/text/scalc/01/04060106.html#bm_id3158247">MOD Function</a> behave differently. In Calc, both operands can be decimal values and they are not rounded before division, thus the resulting remainder may be a decimal value.</p></div>
</div>
<br>

<div class="embedded">
<a name="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Syntax:</h3>
</div>
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-visual-basic line-numbers">
Result = Expression1 MOD Expression2
</code></pre></div>

<div class="embedded">
<a name="functvalue"></a>
<h3 id="hd_id061420171139087480" dir="auto">Return value:</h3>
</div>
<p id="par_id3153380" class="paragraph" dir="auto">Integer</p>

<div class="embedded">
<a name="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parameters:</h3>
</div>
<p id="par_id3145172" class="paragraph" dir="auto"> <span class="emph">Result:</span> Any numeric variable that contains the result of the <span class="literal">MOD</span> operation.</p>
<p id="par_id3151042" class="paragraph" dir="auto"> <span class="emph">Expression1, Expression2:</span> Any numeric expressions for which you want to calculate the remainder after the division of <span class="literal">Expression1</span> by <span class="literal">Expression2</span>.</p>

<div class="embedded">
<a name="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Example:</h3>
</div>
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-visual-basic line-numbers">
Sub ExampleMod
    Dim a As Double, b as Double
    a = 10 : b = 4
    Print a Mod b 'Returns 2
    a = 18 : b = 3.2
    Print a Mod b 'Returns 0
    a = 16.4 : b = 5.9
    Print a Mod b 'Returns 4
End Sub
</code></pre></div>

<a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
  <p id="par_id771617305550403" class="paragraph" dir="auto"><a target="_top" href="en-US/text/scalc/01/04060106.html#bm_id3158247">MOD Function</a></p>
</div>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/03070600.xhp" target="_blank">/text/sbasic/shared/03070600.xhp</a></p>
<p dir="auto">Title is: Mod Operator</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit